import { Column } from "@/api/interface/tableMange";
import { PORT1 } from "@/api/config/servicePort";
// import tableColum from "@/assets/json/tableColum.json";

import http from "@/api";

export const getTableColums = async (params: Column.ReqColumnParams) => {
  const response = await http.post<Column.ResColumnList[]>(PORT1 + "/enterprise/columns/list", params);
  // return tableColum.data;
  return response.data;
};
export const deleteTableColums = async (params: Column.ReqColumnParams) => {
  const response = await http.post(PORT1 + "/enterprise/columns/delete", params);
  return response.data;
};
export const editTableColums = async (params: Column.ResColumnList) => {
  const response = await http.post(PORT1 + "/enterprise/columns/update", params);
  return response.data;
};
export const addTableColums = async (params: Column.ResColumnList) => {
  const response = await http.post(PORT1 + "/enterprise/columns/add", params);
  return response.data;
};

export const sortTableColums = async (params: Column.ReqColumnSortParams) => {
  const response = await http.post(PORT1 + "/enterprise/columns/sort", params);
  return response.data;
};
